﻿@model File_Manager.Models.ParentModelViewRegistro

@{
    ViewBag.Title = "Registro";
}

<h2>Crear nueva cuenta</h2>
<p>
    Llenar los campos para crear la nueva cuenta.
</p>
<p class="error">
    <!--La contraseña requiere minimo Membership.MinRequiredPasswordLength caracteres de longitud.<br />-->
    (*) Campos Obligatorios.

</p>
    <b>La Cédula de Identidad será su Usuario Para Ingresar al Sistema.</b><br /><br />
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/RegisterScript.js")" type="text/javascript"></script>

@using (Html.BeginForm("Register", "Account", FormMethod.Post, new { id="reg_form"}))
{
    @Html.ValidationSummary(true, "Creación de cuenta invalida. Corregir errores y volver a intentar.")
    <div>
        <fieldset>
            <legend>Datos del Estudiante</legend><br />
                <table width= "100%">
                    <tr>
                        <td>
                            <div class="editor-label">
                                (*) @Html.LabelFor(m => m.User_I.name)
                            </div>
                            <div class="editor-field">
                                @Html.TextBoxFor(m => m.User_I.name, new { onkeypress = "return upperCase();" }) <br />
                                @Html.ValidationMessageFor(m => m.User_I.name)
                            </div>
                        </td>
                        <td>
                            <div class="editor-label">
                                (*) @Html.LabelFor(m => m.User_I.last_name)
                            </div>
                            <div class="editor-field">
                                @Html.TextBoxFor(m => m.User_I.last_name, new { onkeypress = "return upperCase();" }) <br />
                                @Html.ValidationMessageFor(m => m.User_I.last_name)
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="editor-label">
                                (*) @Html.LabelFor(m => m.RegisterModel.UserName)
                            </div>
                            <div class="editor-field">
                                @Html.TextBoxFor(m => m.RegisterModel.UserName, new { onkeypress = "return justNumbers(event);" }) <br />
                                @Html.ValidationMessageFor(m => m.RegisterModel.UserName)
                            </div>
                        </td>
                        <td>
                            <div class="editor-label">
                                (*) @Html.LabelFor(m => m.User_I.phone)
                            </div>
                            <div class="editor-field">
                                @Html.TextBoxFor(m => m.User_I.phone)<br />
                                @Html.ValidationMessageFor(m => m.User_I.phone)
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="editor-label">
                                (*) @Html.LabelFor(m => m.RegisterModel.Password)
                            </div>
                            <div class="editor-field">
                                @Html.PasswordFor(m => m.RegisterModel.Password, new { onkeyup = "checkPass(); return false;" })<br />
                                @Html.ValidationMessageFor(m => m.RegisterModel.Password)
                            </div>
                        </td>
                        <td>
                            <div class="editor-label">
                                (*) @Html.LabelFor(m => m.RegisterModel.ConfirmPassword)
                            </div>
                            <div class="editor-field">
                                @Html.PasswordFor(m => m.RegisterModel.ConfirmPassword, new { onkeyup = "checkPass(); return false;" }) <span id="confirmMessagePass" class="confirmMessagePass"></span><br />
                                @Html.ValidationMessageFor(m => m.RegisterModel.ConfirmPassword)
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="editor-label">
                                (*) @Html.LabelFor(m => m.RegisterModel.Email)
                            </div>
                            <div class="editor-field">
                                @Html.TextBoxFor(m => m.RegisterModel.Email, new { onkeyup = "checkMail(); return false;" })<br />
                                @Html.ValidationMessageFor(m => m.RegisterModel.Email)
                            </div>
                        </td>
                        <td>
                           <div class="editor-label">
                                (*) @Html.LabelFor(m => m.RegisterModel.c_Email)
                            </div>
                            <div class="editor-field">
                                @Html.TextBoxFor(m => m.RegisterModel.c_Email, new { onkeyup = "checkMail(); return false;", autocomplete = "off" }) <span id="confirmMessageMail" class="confirmMessageMail"></span><br />
                                @Html.ValidationMessageFor(m => m.RegisterModel.c_Email)
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td width="50%">
                            <div class="editor-label">
                                (*) @Html.LabelFor(m => m.User_I.idRol)
                            </div>
                            <div class="editor-field">
                                @Html.DropDownList("idRol") 
                            </div>
                        </td>
                        <td>
                            <div class="editor-label">
                                @Html.LabelFor(m => m.User_I.career)
                            </div>
                            <div class="editor-field">
                                @Html.TextBoxFor(m => m.User_I.career)<br />
                                @Html.ValidationMessageFor(m => m.User_I.career)
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="editor-label">
                                @Html.LabelFor(m => m.User_I.zone)
                            </div>
                            <div class="editor-field">
                                @Html.TextBoxFor(m => m.User_I.zone)<br />
                                @Html.ValidationMessageFor(m => m.User_I.zone)
                            </div>
                        </td>
                        <td>
                            <div class="editor-label">
                                @Html.LabelFor(m => m.User_I.school)
                            </div>
                            <div class="editor-field">
                                @Html.TextBoxFor(m => m.User_I.school)<br />
                                @Html.ValidationMessageFor(m => m.User_I.school)
                            </div>
                        </td>
                    </tr>
                </table>
        </fieldset>
        <fieldset>
            <legend>Datos del Representante</legend><br />
                <table width= "100%">
                    <tr>
                        <td>
                            <div class="editor-label">
                                (*) @Html.LabelFor(m => m.User_I.parent_name)
                            </div>
                            <div class="editor-field">
                                @Html.TextBoxFor(m => m.User_I.parent_name)<br />
                                @Html.ValidationMessageFor(m => m.User_I.parent_name)
                            </div>
                        </td>
                        <td>
                            <div class="editor-label">
                                (*) @Html.LabelFor(m => m.User_I.parent_last_name)
                            </div>
                            <div class="editor-field">
                                @Html.TextBoxFor(m => m.User_I.parent_last_name)<br />
                                @Html.ValidationMessageFor(m => m.User_I.parent_last_name)
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="editor-label">
                                (*) @Html.LabelFor(m => m.User_I.parent_cedula)
                            </div>
                            <div class="editor-field">
                                @Html.TextBoxFor(m => m.User_I.parent_cedula)<br />
                                @Html.ValidationMessageFor(m => m.User_I.parent_cedula)
                            </div>
                        </td>
                        <td>
                            <div class="editor-label">
                                (*) @Html.LabelFor(m => m.User_I.parent_phone)
                            </div>
                            <div class="editor-field">
                                @Html.TextBoxFor(m => m.User_I.parent_phone)<br />
                                @Html.ValidationMessageFor(m => m.User_I.parent_phone)
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="editor-label">
                                (*) @Html.LabelFor(m => m.User_I.parent_email)
                            </div>
                            <div class="editor-field">
                                @Html.TextBoxFor(m => m.User_I.parent_email)<br />
                                @Html.ValidationMessageFor(m => m.User_I.parent_email)
                            </div>
                        </td>
                        <td>

                        </td>
                    </tr>
                </table>
        </fieldset>
        <fieldset>
            <legend>Datos de la Inscripción</legend><br />
                <table width= "100%">
                    <tr>
                        <td>
                            <div class="editor-label">
                                (*) @Html.LabelFor(m => m.User_I.idTurno)
                            </div>
                            <div class="editor-field">
                                @Html.DropDownList("idTurno")<br /> 
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="editor-label">
                                (*) @Html.LabelFor(m => m.User_I.idSede)
                            </div>
                            <div class="editor-field">
                                @Html.DropDownList("idSede")<br /> 
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="editor-label">
                                (*) @Html.LabelFor(m => m.User_I.idModoPago)
                            </div>
                            <div class="editor-field">
                                @Html.DropDownList("idModoPago")<br /> 
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                              <div class="editor-label">
                                (*) @Html.LabelFor(m => m.User_I.idFormaPago)
                            </div>
                            <div class="editor-field">
                                @Html.DropDownList("idFormaPago")<br /> 
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="editor-label">
                                (*) @Html.LabelFor(m => m.User_I.n_transaction)
                            </div>
                            <div class="editor-field">
                                @Html.TextBoxFor(m => m.User_I.n_transaction)
                                @Html.ValidationMessageFor(m => m.User_I.n_transaction)
                            </div>
                        </td>
                    </tr>
                </table>
        </fieldset>
        <fieldset>
            <legend>Datos de Recomendación</legend><br />
                <table width= "100%">   
                    <tr>
                        <td>
                            <div class="editor-label">
                                ¿Ha sido Recomendado por algún Alumno Inscrito?
                            </div>
                            <div class="editor-label">
                                <input id="r_no" type="radio" name="group1" value="No" checked/> No <br />
                                <input id="r_si" type="radio" name="group1" value="Si"/> Si <br />
                                <div class="editor-label" id="show_hide_recomendado" style="display: none;">
                                    @Html.LabelFor(m => m.User_I.recomendado)<br />
                                    @Html.TextBoxFor(m => m.User_I.recomendado)
                                </div>
                            </div>
                        </td>
                    </tr>
                </table>
        </fieldset>

        <input type="checkbox" name="Box" onclick="checker(this)" /> 
        <span id="msg" style="color:red">Acepto que he leído el Reglamento CYT y estoy de acuerdo con todas sus disposiciones.</span><br /><br />

        <span id="toggle" style="display:none">
            <input type="submit" value="Register" id="boton" disabled="disabled"/>
        </span>

    </div>
}
